# The Kband Mapping: see README.md.

allline = []

def insideBand(x, y, band, n, m) -> bool:
    if x < 0 or y < 0 or x >= n or y >= m: return False
    # print("(x, y) = (", x, ",", y, ")", "dis =", abs(y - (x + (m - n) / 2)), "?", (m - n) / 2)
    return abs(y - (x + (m - n) / 2)) <= band + (m - n) / 2

def Mapping(x, y, b) -> int:
    if x == 0: ans = (y - x)
    else: ans = allline_low[x - 1] + b + (y - x) - max(b - x, 0)
    return ans


if __name__ == '__main__':
    n, m = map(int, input().split())
    band = int(input())
    if(n > m):
        print("\033[0;31mERROR: n > m. Please swap n and m and try again.\033[0m")
        exit(1)
    # The process of counting the number of elements in band is O(n)
    allline_low = [0 for i in range(n)]
    # The process of counting the number of elements in band is O(n^2)
    
    allline = [0 for i in range(n)]
    for i in range(n):
        for j in range(m):
            allline[i] += insideBand(i, j, band, n, m)
    print(allline)
    for i in range(1, n):
        allline[i] += allline[i - 1]
    print(allline)
    
    cnt = 0
    for i in range(n):
        for j in range(m):
        #for j in range(n):
            if (insideBand(i, j, band, n, m) == False): continue
            print(i, j, end = ' ')
            print(Mapping(i, j, band))
            cnt += 1
    # n, data, band = map(int, input().split())
    print(cnt, cnt == allline[-1])
